package com.capitalone.dashboard.auth.access;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.security.access.prepost.PreAuthorize;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@PreAuthorize(Admin.HAS_ROLE_ROLE_ADMIN)
public @interface Admin {

	static final String HAS_ROLE_ROLE_ADMIN = "hasRole('ROLE_ADMIN')";

}
